﻿using Common;
using Microsoft.AspNetCore.Mvc;

namespace yongGu.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class MaterialController : ControllerBase
    {
        [HttpPost]
        public ResponseFromWms2<MaterialModel> Query(dynamic data)
        {
            ResponseFromWms2<MaterialModel> result = new ResponseFromWms2<MaterialModel>();
            //GRPCclient gRPCclient = new GRPCclient();
            DataAccess dataAccess = new DataAccess();
           
            var updateTime = data?.Body?.startTime?.ToString();
            //result.RetData1 = gRPCclient.QueryMaterial(updateTime);
            result.RetData1 = dataAccess.QueryMaterial(updateTime);
            result.IsSuccess = true;
            return result;
        }
    }
}
